package com.zxl.designpattern.behavioral.visitor;

/**
 * 猴子类
 * 实现了Animal接口
 */
public class Monkey implements IAnimal {
    @Override
    public void accept(IVisitor visitor) {
        visitor.visit(this);
        jump();
    }
    
    /**
     * 猴子特有的行为：跳跃
     */
    public void jump() {
        System.out.println("猴子在树上跳跃");
    }


}    